/*
 * MultiTextFieldProy.java
 *
 * Created on 24 de abril de 2009, 11:25
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package com.alemsys.saat.balances.gui;

/**
 *
 * @author vramirez
 */
public class MultiTextFieldProy extends MultiTextField{
    private double inc;
    /** Creates a new instance of MultiTextFieldProy */
    public MultiTextFieldProy(String cod,String titulo, int years, double inc) {
        super(cod, titulo, years);
        //this.setSize(years);
        this.inc=inc;
        this.enableAll(false);
        this.setEnabled(1, true);
    }
    
    public void calcularProyectadas(){
        double col1=0;
        double col2=0;
        for(int i=0;i<getYears()-1;i++){
            col1=this.getNumValue(3*i+1);
            col1*=(1+inc);
            this.setNumValue(3*(i+1)+1, col1);
        }
        this.refreshDifferText();
    }
}
